package com.aw.baselib.widgets.font;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;

import com.aw.baselib.R;
import com.aw.baselib.base.AwBaseApplication;

/**
 * @author : hzw
 * https://blog.csdn.net/yuanxw44/article/details/80019501
 */
@SuppressLint("AppCompatCustomView")
public class AwTvBtnRegular extends AwTvRegularBase {

    @Override
    protected void setViewBg() {
        if(isEnabled()) {
            setBackground(getResources().getDrawable(R.drawable.aw_bg_blue));
        } else {
            setBackground(getResources().getDrawable(R.drawable.aw_bg_gray));
        }
    }

    public AwTvBtnRegular(Context context, AttributeSet attrs) {
        super(context, attrs);
        setTypeface(AwBaseApplication.getInstance().getTypefaceRegular());
        setViewBg();
    }
}
